	ko.bindingConventions = function(conventions, rootNode) {
		rootNode = rootNode || document.body;
		var oldBeforeApplyBindings = ko.beforeApplyBindings;
		ko.beforeApplyBindings = function(bindingRoot) {
			if (typeof oldBeforeApplyBindings === "function")
				oldBeforeApplyBindings(bindingRoot);

			for (var selector in conventions) {
				if (conventions.hasOwnProperty(selector)) {
					var bindingValue = conventions[selector];
					$(selector).each(function() {
						var elem = this, $elem = $(this);
						if ($elem.parents().index(bindingRoot) !== -1) {
							switch (typeof bindingValue) {
								case "string": $elem.attr("data-bind", bindingValue); break;
								case "object": ko.utils.domData.set(elem, "bindings", bindingValue);
							}
						}
					});
				}
			}			
		};
	};